/*
 * =====================================================================================
 *
 *       Filename:  unitquaternion.h
 *
 *    Description:  Unit Quaternion
 *
 *        Version:  1.0
 *        Created:  2009年07月14日 16时51分11秒
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Ying Wang (WY), ywang@nlpr.ia.ac.cn
 *        Company:  Institute of Automation, Chinese Academy of Sciences
 *
 * =====================================================================================
 */

#ifndef UNITQUATERNION_H
#define UNITQUATERNION_H
#include <cmath>
#include "../ncmatrix.h"

class UnitQuaternion
{
public:
	UnitQuaternion(double x, double y, double z, double w);
public:
	UnitQuaternion& operator = (const UnitQuaternion & uq) ;

	UnitQuaternion operator * (const UnitQuaternion &ruq) const;
public:
	NCmatrix<double> roationMatrix() const;
private:
	double x;
	double y;
	double z;
	double w;
public:
	static UnitQuaternion fromAxisAngle(double x, double y, double z, double theta);
};
#endif
